<template>
  <div class="container">
      <Movie-item :item="item" v-for="item of mores" :key="item._id"></Movie-item>

  </div>
</template>

<script>
import HomeHttp from '../../../models/HomeHttp'
import MovieItem from '../../../components/MovieItem.vue';
export default {
    data() {
        return {
            mores:[]
        }
    },
    props:{
        item:{
            type:Object
        }
    },
    components:{
        MovieItem
    },
    async activated() {
        var {value} =this.$route.query;
        var res =await HomeHttp.getMovie(value)
        console.log(res);
        this.mores=res.data.res;
        /* var fn = this.handleQuery(value);
        var res =await HomeHttp[fn]();
        this.mores=res.data.res */
    },
    /* methods: {
        handleQuery(value){
            if(value =="top250"){
                return 'getMovieTop250'
            }else if(value =="inTheaters"){
                return 'getMovieIntheaters'
            }else if(value =='comingSoon'){
                return 'getMovieComingSoon'
            }
        }
    }, */
}
</script>

<style>

</style>